#ifndef FACESERVER_H
#define FACESERVER_H

#include <QMainWindow>
#include <QTcpServer>
#include <QTcpSocket>
#include <opencv2/opencv.hpp>
#include "qobjectface.h"
#include <QSqlTableModel>
#include <QSqlRecord>
#include <QThread>
#include <QSqlQuery>
QT_BEGIN_NAMESPACE
namespace Ui { class faceserver; }
QT_END_NAMESPACE

class faceserver : public QMainWindow
{
    Q_OBJECT

public:
    faceserver(QWidget *parent = nullptr);
    ~faceserver();
signals:
    void query(cv::Mat& image);// 查找信号，位置 应该放在 没实现多线程时，查找函数那里

 private slots:
    void read();
    void read_data();
    void recv_faceid(int64_t faceid);

private:
    Ui::faceserver *ui;
    QTcpServer server;
    QTcpSocket* tsocket;
    quint64 bsize;
    qobjectface object;
    QSqlTableModel model;//定义表模型

};
#endif // FACESERVER_H
